﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TestPlanModule.cs" company="">
//   
// </copyright>
// <summary>
//   Defines the TestPlanModule type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace UITest.Helpers.TFS
{
    using Microsoft.TeamFoundation.TestManagement.Client;

    /// <summary>
    /// </summary>
    public class TestPlanModule : TFSModule
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="TestPlanModule"/> class. 
        /// </summary>
        /// <param name="tfs">
        /// </param>
        public TestPlanModule(TFSLibrary tfs)
            : base(tfs)
        {
        }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// </summary>
        /// <param name="id">
        /// </param>
        /// <returns>
        /// The <see cref="ITestPlan"/>.
        /// </returns>
        public ITestPlan Find(int id)
        {
            return this.TFS.TestManagement.TestPlans.Find(id);
        }

        /// <summary>
        /// </summary>
        /// <param name="plan">
        /// </param>
        /// <param name="id">
        /// </param>
        /// <returns>
        /// The <see cref="ITestPoint"/>.
        /// </returns>
        public ITestPoint FindTestPoint(ITestPlan plan, int id)
        {
            return plan.FindTestPoint(id);
        }

        #endregion
    }
}